package com.pacy.pacybaseproject.utils;

import android.text.TextUtils;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

/**
 * @author PACY
 * @date 2021/11/30
 * description:
 */
public class ImageUtils {

    public static void loadImage(String url, ImageView imageView) {
        if (!TextUtils.isEmpty(url)) {
            //使用Glide框架加载图片
            Glide.with(imageView.getContext())
                    .load(url)
                    .into(imageView);
        }
    }

    public static void loadImage(int url, ImageView imageView) {
        //使用Glide框架加载图片
        Glide.with(imageView.getContext())
                .load(url)
                .into(imageView);
    }
}
